<script>
  // #1
  setTimeout(() => {
    // #2
    new Promise(resolve => {
      resolve();
    }).then(() => {
      // #5
      console.log('angular');
    });

    console.log(4);
    setTimeout(function () {
      // #6
      Promise.resolve().then(res => {
        // #10
        console.log(444);
      })
    })
    Promise.resolve().then(res => {
      // #7
      console.log(888);
    })
  });

  new Promise(resolve => {
    resolve();
    console.log(1)
  }).then(() => {
    // #3
    console.log(3);
    setTimeout(function () {
      // #4
      Promise.resolve().then(() => {
        // #8
        console.log('vue');
        // return Promise.resolve(undefined) // 隐藏的
      }).then(() => {
        // #9
        Promise.resolve().then(() => {
          // #10
          console.log('react')
        })
      })
    })
  })
  console.log(2);
</script>